import * as min_app_fs from "./min_app_fs";
import * as min_app_shell from "./min_app_shell";
import * as extra_info from "./extra_info";

export {
    min_app_fs,
    min_app_shell,
    extra_info,
}

export interface MinAppInfo {
    userId: string;
    userDisplayName: string;
    crossHttp: boolean;
    redisProxyToken?: string;
    redisProxyAddr?: string;
    mongoProxyToken?: string;
    mongoProxyAddr?: string;
    mysqlProxyToken?: string;
    mysqlProxyAddr?: string;
    postGresProxyToken?: string;
    postGresProxyAddr?: string;
    sshProxyToken?: string;
    sshProxyAddr?: string;
    netUtilToken?: string;
    netUtilAddr?: string;
    extraInfo?: string;
    extraInfoName?: string;
}

export function getMinAppInfo(): MinAppInfo | undefined {
    // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
    return (window as any).minApp as MinAppInfo | undefined;
}